import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:ff_flutter/screens/messages/widgets/chat_section/widgets/chat_tab_bar.dart';
import 'package:ff_flutter/screens/messages/widgets/chat_section/widgets/chat_list.dart';

class ChatSection extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(top: 30.h, left: 30.w, right: 30.w),
      decoration: BoxDecoration(
        color: const Color(0xFF151313),
        borderRadius: BorderRadius.circular(30.r),
      ),
      child: DefaultTabController(
        length: 2,
        child: SizedBox(
          height: 1000.h,
          child: Column(
            children: [
              ChatTabBar(),
              Expanded(
                child: TabBarView(
                  physics: const NeverScrollableScrollPhysics(),
                  children: const [
                    ChatList(isFriend: true),
                    ChatList(isFriend: false),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
